Skip to content

More Printer cleanups #144949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 13, 2025
Merged

More Printer cleanups #144949

merged 7 commits into from
Aug 13, 2025

Conversation

nnethercote
Copy link
Contributor

@nnethercote nnethercote commented Aug 5, 2025

A sequel to #144776.

r? @davidtwco

The use of `print_value_path` means the value namespace is always used
and the `guess_def_namespace` call is unnecessary. This commit removes
the `guess_def_namespace` call and hard-codes `ValueNS`. It also changes
the `print_value_path` to `print_def_path` for consistency with
`def_path_str_with_args`.
Three of them are named `AbsolutePathPrinter`, which is confusing, so
give those names that better indicate how they are used. And then there
is `SymbolPrinter` and `SymbolMangler`, which are renamed as
`LegacySymbolMangler` and `V0SymbolMangler`, better indicating their
similarity.
- `same_path` can just be a `bool`.
- `expected` and `found` are only needed inside the block.
- Neaten a comment.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 5, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 5, 2025

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

@nnethercote nnethercote changed the title More printer cleanups More Printer cleanups Aug 5, 2025
@rust-log-analyzer

This comment has been minimized.

These details took me some time to work out.
I find these name clearer, and starting them all with `print_` makes
things more consistent.
@nnethercote nnethercote force-pushed the more-Printer-cleanups branch from dd90af9 to 42a1042 Compare August 6, 2025 03:06
@davidtwco
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 13, 2025

📌 Commit 42a1042 has been approved by davidtwco

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 13, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Aug 13, 2025
… r=davidtwco

More `Printer` cleanups

A sequel to rust-lang#144776.

r? `@davidtwco`
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Aug 13, 2025
… r=davidtwco

More `Printer` cleanups

A sequel to rust-lang#144776.

r? ``@davidtwco``
bors added a commit that referenced this pull request Aug 13, 2025
Rollup of 9 pull requests

Successful merges:

 - #144761 (aarch64: Make `outline-atomics` a known target feature)
 - #144949 (More `Printer` cleanups)
 - #144955 (search graph: lazily update parent goals)
 - #144962 (Add aarch64_be-unknown-none-softfloat target)
 - #145153 (Handle macros with multiple kinds, and improve errors)
 - #145241 ([AVR] Changed data_layout)
 - #145341 (Install libgccjit into the compiler's sysroot when cg_gcc is enabled)
 - #145349 (Correctly handle when there are no unstable items in the documented crate)
 - #145356 (Add another example for escaped `#` character in doctest in rustdoc book)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e7e3a37 into rust-lang:master Aug 13, 2025
10 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 13, 2025
rust-timer added a commit that referenced this pull request Aug 13, 2025
Rollup merge of #144949 - nnethercote:more-Printer-cleanups, r=davidtwco

More `Printer` cleanups

A sequel to #144776.

r? ```@davidtwco```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants